library(tidyverse)
library(p8105.datasets)
library(plotly)
data(instacart)
ny_noaa=ny_noaa
I will first tidy the data set. It is important to standardize some
of the values including, snow, tmax,
tmin, and prcp.
ny_noaa <- ny_noaa %>%
janitor::clean_names() %>%
separate(date, into=c("year", "month", "day"), sep= "-") %>%
mutate(tmax = as.numeric(tmax)/10,
tmin = as.numeric(tmin)/10,
prcp = as.numeric(prcp)/10,
snow_mm=snow,
snow=round(snow_mm*0.03937*4)/4) %>%
drop_na() %>%
select(-snow)
I will create a boxplot for one of my plots for the flexdashboard.
ny_noaa %>%
plot_ly(x=~year, y = ~snow_mm, color = ~year, type = "box", colors = "viridis")